﻿<div class="plugins section">
    <h2>Install Plugin</h2>

    <h2>
        @ViewData["PluginName"]  was installed
    </h2>

    <h3>
        Final Step:
    </h3>

    <p>
        Before the plugin can function properly, the <em>Web.config</em> file must be edited to include the assembly
        <em>@ViewData["AssemblyName"] </em> under the "assemblies" section:

        <pre>
            <system.web>
                <compilation targetFramework=\"4.0\">
                    <assemblies>" 
                        <add assembly=\"" + ViewData["AssemblyName"] + "\"/>
        </pre>

    </p>

    <p>
        You may do this manually or press the button below to automatically do this.
        <br />

        <strong>Note: Editing the <em>Web.config</em> file will restart the <em>AppDomain</em></strong>
    </p>

    @using(Html.BeginForm("EditWebConfig", "Plugins")) 
    { 
        <input type="hidden" value="@ViewData["AssemblyName"] " name="AssemblyName" />
        <input type="hidden" value="@ViewData["PluginName"] " name="PluginName" />
        <input type="submit" value="Automatically edit Web.config file" /> <text>| @Html.ActionLink("Back to plugins", "Index", "Plugins") </text>
    } 

</div>